import {request} from '@/utils/request'
// import type { AxiosPromise } from 'axios'
import type { GoodsVo, Result } from '@/api/goods/types.ts'
import type { PageParams } from '../global'

/**
 * 查询商品轮播图列表
 */
type HotParams = PageParams & {orderSort?: string} //交叉类型写法
export const getGoodsApi = (data: HotParams) => {
  return request<GoodsVo[]>({
    url: '/api/mall/goods/list',
    method: 'GET',
    data: data
  })
}

/* 商品详情 */

export const getGoodDetailApi = (id: string )=> {
  return request<GoodsVo>({
    url: '/api/mall/goods/detail/' + id,
    method: 'GET'
  });
};

